package com.github.kotvertolet.youtubejextractor.models.newModels;


import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

public class PlayerConfig implements Sequenceable, Serializable {


    @SerializedName("webPlayerConfig")
    private WebPlayerConfig webPlayerConfig;

    @SerializedName("mediaCommonConfig")
    private MediaCommonConfig mediaCommonConfig;

    @SerializedName("daiConfig")
    private DaiConfig daiConfig;

    @SerializedName("audioConfig")
    private AudioConfig audioConfig;

    @SerializedName("streamSelectionConfig")
    private StreamSelectionConfig streamSelectionConfig;



    public static final Sequenceable.Producer<PlayerConfig> CREATOR = new Producer<PlayerConfig>() {
        @Override
        public PlayerConfig createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            PlayerConfig playerConfig = new PlayerConfig();
            playerConfig.unmarshalling(parcel);
            return playerConfig;
        }
    };
    
    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.webPlayerConfig);
        parcel.writeSequenceable(this.mediaCommonConfig);
        parcel.writeSequenceable(this.daiConfig);
        parcel.writeSequenceable(this.audioConfig);
        parcel.writeSequenceable(this.streamSelectionConfig);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.webPlayerConfig);
        parcel.readSequenceable(this.mediaCommonConfig);
        parcel.readSequenceable(this.daiConfig);
        parcel.readSequenceable(this.audioConfig);
        parcel.readSequenceable(this.streamSelectionConfig);
        return true;
    }

    @Override
    public String toString() {
        return "PlayerConfig{" +
                "webPlayerConfig=" + webPlayerConfig +
                ", mediaCommonConfig=" + mediaCommonConfig +
                ", daiConfig=" + daiConfig +
                ", audioConfig=" + audioConfig +
                ", streamSelectionConfig=" + streamSelectionConfig +
                '}';
    }

    public WebPlayerConfig getWebPlayerConfig() {
        return webPlayerConfig;
    }

    public void setWebPlayerConfig(WebPlayerConfig webPlayerConfig) {
        this.webPlayerConfig = webPlayerConfig;
    }

    public MediaCommonConfig getMediaCommonConfig() {
        return mediaCommonConfig;
    }

    public void setMediaCommonConfig(MediaCommonConfig mediaCommonConfig) {
        this.mediaCommonConfig = mediaCommonConfig;
    }

    public DaiConfig getDaiConfig() {
        return daiConfig;
    }

    public void setDaiConfig(DaiConfig daiConfig) {
        this.daiConfig = daiConfig;
    }

    public AudioConfig getAudioConfig() {
        return audioConfig;
    }

    public void setAudioConfig(AudioConfig audioConfig) {
        this.audioConfig = audioConfig;
    }

    public StreamSelectionConfig getStreamSelectionConfig() {
        return streamSelectionConfig;
    }

    public void setStreamSelectionConfig(StreamSelectionConfig streamSelectionConfig) {
        this.streamSelectionConfig = streamSelectionConfig;
    }
}
